package com.tanhua.server.service;

import com.tanhua.dubbo.api.UserLocationApi;
import com.tanhua.server.interceptor.UserHolder;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class BaiduService {

    @DubboReference
    private UserLocationApi userLocationApi;
    //上报地理信息
    public void location(Double latitude, Double longitude, String addrStr) {
        Long userId = UserHolder.getUserId();
        //保存
        userLocationApi.save(userId,latitude,longitude,addrStr);
    }
}
